package io.kiki.stack.netty.command;

import lombok.Getter;
import lombok.extern.slf4j.Slf4j;

@Slf4j
//@Setter
@Getter
public enum HeartbeatCommandCode implements CommandCode {

    heartbeat(CommandCode.heartbeat);

    private final short value;

    HeartbeatCommandCode(short value) {
        this.value = value;
    }

    public static HeartbeatCommandCode valueOf(short value) {
        switch (value) {
        case CommandCode.heartbeat:
            return heartbeat;
        }
        throw new IllegalArgumentException("Unknown Rpc command code value ," + value);
    }

    @Override
    public short value() {
        return this.value;
    }

}